using System.Collections.Generic;

namespace CastleSample.UI.Core
{
    public class ModuleCollection : List<IModule>
    {
        public IModule this[string moduleName]
        {
            get
            {
                foreach (IModule module in this)
                {
                    if (module.Name.Trim().ToLower() == moduleName.Trim().ToLower())
                    {
                        return module;
                    }
                }
                return null;
            }
        }
    }
}